package com.stox.ui.swing.view;

import java.awt.BorderLayout;

import javax.swing.JInternalFrame;

import com.stox.ui.swing.event.listener.IconifiedOnTopListener;

public class InternalFrameView extends JInternalFrame {
	private static final long serialVersionUID = 5948676066180500336L;

	private IconifiedOnTopListener iconifiedOnTopListener;
	
	public InternalFrameView(String name) {
		this(name,true,true,true,true);
	}
	
	public InternalFrameView(String title, boolean resizable, boolean closable,
			boolean maximizable, boolean iconifiable) {
		super(title, resizable, closable, maximizable, iconifiable);
		setLayout(new BorderLayout());
	}

	public void afterPropertiesSet(){
		addVetoableChangeListener(iconifiedOnTopListener);
	}

	public IconifiedOnTopListener getIconifiedOnTopListener() {
		return iconifiedOnTopListener;
	}

	public void setIconifiedOnTopListener(
			IconifiedOnTopListener iconifiedOnTopListener) {
		this.iconifiedOnTopListener = iconifiedOnTopListener;
	}
	
}
